import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [{
        path: '/',
        name: 'Home',
        component: Home
    },
    {
        path: '/city',
        name: 'City',
        component: () =>
            import ('../views/City/City.vue')
    }, {
        path: "/detail:id",
        name: "city",
        component: function() {
            return import ('../views/Detail/Detail.vue')
        }
    }
]

const router = new VueRouter({
    routes
})

// eslint-disable-next-line eol-last
export default router